﻿using System;
using System.Threading;
using System.Threading.Tasks;

namespace TaskLib.Scheduling
{
#nullable enable
    /// <summary>
    /// 执行任务
    /// </summary>
    public class CustomTask : Task
    {
        /// <summary>
        /// 任务类型
        /// </summary>
        public TaskPriority Priority { get; set; }

        /// <summary>
        /// 任务Id
        /// </summary>
        public string TaskId { get; set; } = String.Empty;

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime StartTime { get; set; }

        /// <summary>
        /// 完成时间
        /// </summary>
        public DateTime CompletedTime { get; set; }

        public CustomTask(Action action)
            : base(action)
        {

        }

        public CustomTask(Action action, CancellationToken cancellationToken)
            : base(action, cancellationToken)
        {

        }

        public CustomTask(Action action, TaskCreationOptions creationOptions)
            : base(action, creationOptions)
        {

        }

        public CustomTask(Action<object?> action, object? state)
            : base(action, state)
        {

        }

        public CustomTask(Action action, CancellationToken cancellationToken, TaskCreationOptions creationOptions)
            : base(action, cancellationToken, creationOptions)
        {

        }

        public CustomTask(Action<object?> action, object? state, CancellationToken cancellationToken)
            : base(action, state, cancellationToken)
        {

        }

        public CustomTask(Action<object?> action, object? state, TaskCreationOptions creationOptions)
            : base(action, state, creationOptions)
        {

        }

        public CustomTask(Action<object?> action, object? state, CancellationToken cancellationToken, TaskCreationOptions creationOptions)
            : base(action, state, cancellationToken, creationOptions)
        {

        }
    }
}
